Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SmartAccount] Get authenticator query #8142

Merged
merged 12 commits into from
Apr 26, 2024
Merged

[SmartAccount] Get authenticator query #8142

merged 12 commits into from
Apr 26, 2024

Conversation

iboss-ptk
Copy link
Contributor

@iboss-ptk iboss-ptk commented Apr 25, 2024

What is the purpose of the change

Query for getting single authenticator + stargate whitelist

Testing and Verifying

Tested through integration spend limit contract

Summary by CodeRabbit

  • New Features

    • Introduced a new feature to fetch specific authenticators for smart accounts, enhancing user capabilities in managing account securities.
  • Enhancements

    • Expanded whitelisted queries to support new smart account functionalities, improving interaction security and compliance.
  • Bug Fixes

    • Updated error message formatting in spend limit tests to include more precise time details, enhancing debugging accuracy.

Copy link
Contributor

coderabbitai bot commented Apr 25, 2024

Walkthrough

The recent updates aim to enhance smart account functionalities within the Osmosis blockchain framework. A new RPC, GetAuthenticator, now allows fetching specific authenticator data for smart accounts. Whitelisting for secure access and a test suite update for better error message precision further refine the system.

Changes

Files Change Summary
proto/.../query.proto, x/smart-account/keeper/query.go Added GetAuthenticator RPC to fetch specific authenticator data.
wasmbinding/stargate_whitelist.go Added whitelisting for GetAuthenticator and GetAuthenticators queries.
x/smart-account/authenticator/spend_limits_test.go Updated error message formatting to include nanoseconds.

🐇✨🌟
In the land of code where the smart accounts play,
A new RPC sprang up, hip hip hooray!
Fetching authenticators, both near and far,
Under the watchful eyes of the blockchain star.
Oh, how the data dances, precise and free,
In the magical grove of the binary tree!
🌟✨🐇


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 49c0a7b and 478aed5.
Files selected for processing (1)
  • proto/osmosis/smartaccount/v1beta1/query.proto (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • proto/osmosis/smartaccount/v1beta1/query.proto

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@@ -281,7 +281,7 @@ func (s *SpendLimitAuthenticatorTest) TestSpendLimit() {
s.Require().Contains(
err.Error(),
fmt.Sprintf(
"Current time %d.%d not within time limit None - %s.%s: execute wasm contract failed",
"Current time %d.%09d not within time limit None - %s.%s: execute wasm contract failed",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah not sure why it's in here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will revert the commit and let the merge figure out.

@PaddyMc PaddyMc closed this Apr 25, 2024
@PaddyMc PaddyMc reopened this Apr 25, 2024
Copy link
Collaborator

@PaddyMc PaddyMc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a CHANGELOG entry?

@iboss-ptk iboss-ptk force-pushed the boss/get-authenticator branch from 6c7226b to e71dc74 Compare April 26, 2024 02:47
This reverts commit e71dc74.
@iboss-ptk iboss-ptk force-pushed the boss/get-authenticator branch from 0c6f34f to f7bf5fb Compare April 26, 2024 02:50
@iboss-ptk iboss-ptk force-pushed the boss/get-authenticator branch from 3ea2cf7 to 49c0a7b Compare April 26, 2024 02:55
@iboss-ptk iboss-ptk added the V:state/compatible/no_backport State machine compatible PR, depends on prior breaks label Apr 26, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Out of diff range and nitpick comments (5)
CHANGELOG.md (5)

Line range hint 340-340: Remove trailing punctuation in heading.

-## [v6.4.0].
+## [v6.4.0]

Line range hint 603-603: Replace bare URL with a markdown link.

- https://github.com/osmosis-labs/cosmos-sdk/pull/100
+ [sdk-#100](https://github.com/osmosis-labs/cosmos-sdk/pull/100)

Line range hint 661-661: Replace bare URL with a markdown link.

- https://github.com/osmosis-labs/iavl/pull/5
+ [iavl-5](https://github.com/osmosis-labs/iavl/pull/5)

Line range hint 1242-1242: Ensure there are no empty links in the document.

Please check and update the link at line 1242 to ensure it directs to a valid URL or resource.


Line range hint 1001-1001: Ensure heading levels increment by one level at a time.

Please adjust the heading levels in the document to ensure they follow a logical order, incrementing by one level at a time.

@iboss-ptk
Copy link
Contributor Author

Would you mind adding a CHANGELOG entry?

Added

@iboss-ptk iboss-ptk self-assigned this Apr 26, 2024
@PaddyMc PaddyMc merged commit bb3d2ed into main Apr 26, 2024
1 check passed
@PaddyMc PaddyMc deleted the boss/get-authenticator branch April 26, 2024 09:18
@github-actions github-actions bot mentioned this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V:state/compatible/no_backport State machine compatible PR, depends on prior breaks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants